package example.controller;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class LoggerServlet extends HttpServlet {
	
	private static final Logger log = Logger.getLogger(LoggerServlet.class.getName());
	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
		throws IOException, ServletException {
		
		log.setLevel(Level.FINE);
		
		log.info("An informational message.");

        log.warning("A warning message.");

        log.severe("An error message.");
		
	}
}
